﻿package {
    import fl.controls.listClasses.CellRenderer;
    import fl.controls.listClasses.ICellRenderer;
	import flash.display.Sprite;

    public class TaskColor extends CellRenderer implements ICellRenderer 
	{
        public function TaskColor():void 
		{
            super();
        }

        public static function getStyleDefinition():Object 
		{
            return CellRenderer.getStyleDefinition();
        }
		
        override protected function drawBackground():void 
		{
			try
			{
				var square:Sprite = new Sprite();
				addChild(square);
				square.graphics.beginFill('0x00'+_data.color);
				square.graphics.drawRect(1,1,10,18);
				square.graphics.endFill();
				super.drawBackground();
			}
			catch(e){}
        }
		
    }
}
